﻿@model GrainManage.Web.Models.Price.AddPriceModel
@ScriptHelper.CssLink("Create.css")
@ScriptHelper.Autocomplete()
<script type="text/javascript">
    $(document).ready(function () {
        var data = { pageIndex: 0, pageSize: 100 };
        BindAutoComplete("/Type/GetGrainType", "#Grain", data, true);
        BindAutoComplete("/Type/GetPriceType", "#PriceType", data, true);
    });
</script>

<div>
    @using (Html.BeginForm("Insert", "Price", FormMethod.Post))
    {
        <table class="create">
            <tr>
                <td>@Html.LabelFor(model => model.Grain)</td>
                <td>@Html.EditorFor(model => model.Grain)</td>
                <td>@Html.ValidationMessageFor(model => model.Grain)</td>
            </tr>

            <tr>
                <td>@Html.LabelFor(model => model.UnitPrice)</td>
                <td>@Html.EditorFor(model => model.UnitPrice)</td>
                <td>@Html.ValidationMessageFor(model => model.UnitPrice)</td>
            </tr>

            <tr>
                <td>@Html.LabelFor(model => model.PriceType)</td>
                <td>@Html.EditorFor(model => model.PriceType)</td>
                <td>@Html.ValidationMessageFor(model => model.PriceType)</td>
            </tr>

            <tr>
                <td>@Html.LabelFor(model => model.Remarks)</td>
                <td>@Html.EditorFor(model => model.Remarks)</td>
                <td>@Html.ValidationMessageFor(model => model.Remarks)</td>
            </tr>

            <tr class="submit">
                <td></td>
                <td>
                    <input type="submit" value="@GrainManage.Web.Resources.GlobalResx.Create" />
                </td>
            </tr>
        </table>
    }
</div>
